      var primary_color;
        
        //设置需要改变颜色的元素及其样式
        function change(colo){
        	
//					hover:					
					$(".top_box").hover(function(){
				    $(this).css({"background-color":colo});
					},function(){
				    $(this).css({"background-color":"#fff"});
					});

					//立即加载主题颜色
					$(".list_status > span,.success-tip,.add_blue,#title_tab").css("background-color",colo);
            $(".reset_btn,.submit_btn,.product_btn,.product_btn_box span,.form_box div.btn_box input,header h2,header,.remove-cart-btn,.order-m-btn span,.confirm_btn,.pop .supbtn,.sure-btn,.top_box:hover,.product-handle .join-cart-btn,.cart-btn,.page_info button,.item_detail_btn_box a").css("background-color",colo);
            $(".link-left,.stock_btn_box div a,.stock_btn_box div,.pop h5,.status_box,.parameters_buy,.order_btn,.modal-button,.link-box a,#orderDetail > div:nth-child(1)>div,.tip-text > div.buttons span a").css("color",colo);
            $(".order_btn,.top_box").css("border","1px solid"+colo);
           primary_color = colo;
            return primary_color;
       }
        
        
          function GetThemesColor() {      
          	//1.判断当前是不是登录页
          	//2.getcookie("ThemesColor")是否有值
          	if ($.cookie("ThemesColor")==undefined|| (window.location.pathname == "/customer/index" || window.location.pathname == "/")){
               $.ajax({
                   url: "/team/GetThemesColor",//提交地址
                   type: "get",//提交方式
                   contentType: "application/json; charset=utf-8",
                   success: function (Datas) {
                   	setcookie("ThemesColor",Datas);
                    change(Datas);
								
                   }
               });
             }else{
	           	change($.cookie("ThemesColor"));
	           }
           }
        
      //设置默认颜色主题
      $(function(){
        	GetThemesColor();
        	primary_color = $.cookie("ThemesColor");

				$(".list_status ul li").click(function () {
          $(this).siblings().css({"background":"#a1a1a1"}).end().css({"background-color":primary_color});
     		});
     		
//		    $("#_role ul li").toggle(function(){
//					   $(this).css("background-color","primary_color");},
//					  function(){
//					  $(this).css("background-color","#a1a1a1");} 
//				);
 
           
      });
    